mgrs = {};
enums = {};
mgrs.singleTable = function(obj,SingletonTable,objName)
	local function getInstance(o,SingletonTable)
		o = o or {};
		setmetatable(o,SingletonTable);
		SingletonTable.__index = SingletonTable;
		return o;
	end	
	local function __Getter__()
		if SingletonTable.instance == nil then	
			SingletonTable.instance = getInstance({},SingletonTable);	
		end
		return SingletonTable.instance;
	end
	obj[objName] = __Getter__();
end


mgrs.singleClass = function(obj,SingletonCls,objName)
	local function __Getter__()
		if SingletonCls.instance == nil then	
			SingletonCls.instance = SingletonCls.new();
		end
		return SingletonCls.instance;
	end
	obj[objName] = __Getter__();
end	
